﻿namespace HutongGames.PlayMaker
{
    using System;
    using UnityEngine;

    [Serializable]
    public class FsmGameObject : NamedVariable
    {
        [SerializeField]
        private GameObject value;

        public FsmGameObject()
        {
        }

        public FsmGameObject(FsmGameObject source) : base(source)
        {
            this.value = source.value;
        }

        public FsmGameObject(string name) : base(name)
        {
        }

        public static implicit operator FsmGameObject(GameObject value)
        {
            FsmGameObject obj3 = new FsmGameObject(string.Empty);
            obj3.value = value;
            return obj3;
        }

        public override string ToString()
        {
            if (this.value != null)
            {
                return this.value.name;
            }
            return "None";
        }

        public GameObject Value
        {
            get
            {
                return this.value;
            }
            set
            {
                this.value = value;
            }
        }
    }
}

